package com.huyanqi.front.rest.tool;

import org.springframework.security.authentication.encoding.ShaPasswordEncoder;

import com.huyanqi.core.util.Constants;


/**
 * 
 * <p>Title: AuthSecretStr.java</p>
 * 
 * <p>Description: </p>
 * 
 * <p>Datetime: 2011-12-28 上午11:49:59</p>
 *
 * @company 成都映潮科技有限公司
 * 
 * @author <a href="mailto:liwei@sunsharp.cn">p.k.ripper</a>
 *
 */
public class AuthSecretStr {
	public static String shaEncode(String password) {
		ShaPasswordEncoder sha = new ShaPasswordEncoder();
		sha.setEncodeHashAsBase64(false);
		String pwd = sha.encodePassword(password, null);
		return pwd;
	}
	
//	public static boolean authSecret(String secretstr,Long uid,Long secretnum){
//	}
	public static void main(String[] args){
//		String str = Constants.secretchar+100000511+10000008;
//		//System.out.println(str.equals("yckjyxgs!@#$%32110000059510000001"));
//		System.out.println(MyPassEncode.shaEncode("2382577"));
	//	System.out.println(Constants.secretchar+"100000595"+"100000001");
	}
}
